package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.UserLoginDao;
import com.itheima.domian.Role;
import com.itheima.domian.UserLogin;
import com.itheima.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;


import java.util.List;

/**
 * @author althle
 * @create 08-24-14:46
 * @功能
 * @注释
 */
@Service
public class UserLoginServiceImpl implements UserLoginService {

    @Autowired
    private UserLoginDao userLoginDao;

    @Override
    public UserLogin findOne(String username, String password) {
        return userLoginDao.LoginIn(username,password);
    }

    @Override
    public List<UserLogin> findAll() {
        return userLoginDao.findAll();
    }

    @Override
    public UserLogin findByName(String username) {

        return userLoginDao.findByName(username);

    }

    @Override
    public List<Role> findRoleList(Integer id) {
        return userLoginDao.findRoleList(id);
    }


}
